﻿@model ScrumTracker.Models.Product
@{
    ViewBag.Title = "Edit Product";
    Layout = "~/Views/Shared/_Layout5.cshtml";
}
@if (false)
{
    <script src="../../Scripts/jquery-1.5.1-vsdoc.js" type="text/javascript"></script>
}
@section head{
    <script type="text/javascript">
        $(function () {
            $('form[rel=delete]').submit(function (e) {
                if (confirm("Are you sure?")) {
                    return true;
                }
                else {
                    e.preventDefault();
                    return false;
                }
            });
        });
    </script>
}
<div id="tabs" style="margin: 0; overflow: hidden;">
    <ul>
        <li>
            <a href="#general">General</a></li>
    </ul>
    <div id="general">
        <div style="text-align: right;">
            @using (Html.BeginForm("Delete", "Products", new { @id = Model.ProductId }, FormMethod.Post, new { rel = "delete" }))
            {
                @Html.AntiForgeryToken()
                <input type="submit" value="delete" class="button"/>
            }
            @*<a href="@Url.Action("Delete", "Products", new { @id = Model.ProductId })" style="float: right;" rel="delete">delete</a>*@
        </div>
        <hr />
        @using (Html.BeginForm("Update", "Products", FormMethod.Post))
        {
            @Html.EditorForModel()
            <input type="submit" value="Update" class="button" />
        }
    </div>
</div>
